package thread;

public class ThreadDemo01 {
    public static void main(String[] args) {
        System.out.println(Thread.currentThread().getName());

        Thread t1 = new MyThread01();
        Thread t2 = new MyThread02();

        t1.start();
        t2.start();

    }

}

class MyThread01 extends Thread{
    @Override
    public void run() {
        String tName = Thread.currentThread().getName();
        for (int i = 0; i < 5; i++) {
            System.out.println(tName+"MyThread01.run()");
        }
    }
}

class MyThread02 extends Thread{
    @Override
    public void run() {
        String tName = Thread.currentThread().getName();
        for (int i = 0; i < 5; i++) {

            System.out.println(tName+"MyThread02.run()");
        }
    }
}